package day9;

import java.util.Scanner;

public class t2 {
    public static void main(String[] args) {
        Scanner sc =new Scanner(System.in);
        System.out.println("请输入一个字符串：");
        String str= sc.next();
        int c1=0,c2=0,c3=0;
        for(int i=0;i<str.length();i++){
            char c=str.charAt(i);
            if('a'<c && 'z'>c) c1++;
            if('A'<c && 'Z'>c) c2++;
            if('0'<c && '9'>c) c3++;
        }
        System.out.println("该字符串的小写字母有"+c1+"个");
        System.out.println("该字符串的大写字母有"+c2+"个");
        System.out.println("该字符串的数字有"+c3+"个");
    }
}
